feat: support last cycle prime summary modal#5630
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR adds a
Confidence Score: 5/5Safe to merge; all changes are additive and the existing card components remain backward-compatible via optional props with sensible fallbacks. The new modal is entirely placeholder-driven with explicit TODO comments, the component extensions use optional props that don't affect existing callers, and all translation keys are freshly added without touching existing ones. The two flagged items are design notes for the upcoming API integration pass, not defects in the current code.
Important Files Changed
Reviews (2): Last reviewed commit: "fix: solve comments" | Re-trigger Greptile |
| @@ -37,15 +45,15 @@ export const UserRewardsCard: React.FC<UserRewardsCardProps> = ({ | |||
| <div> | |||
There was a problem hiding this comment.
Hardcoded "this cycle" label shown in last cycle modal
UserRewardsCard always renders the title from t('primeLeaderboard.userRewards.title') ("Your Prime rewards this cycle"), but LastCycleSummaryModal uses this card to display last cycle data. Unlike TotalRewardsCard, which received a new optional title prop to allow overriding the default text, UserRewardsCard has no equivalent mechanism — so the label will always read "this cycle" even when embedded in the Last Cycle Summary Modal.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Coverage Report for ./apps/evm
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@greptile review again |
62bff1f to
4f5780c
Compare
edf37b3 to
0a149bb
Compare
7da6c3a to
2131c0f
Compare
30026a2 to
4cd7e90
Compare
Replace the top total-rewards card with a user rank card that surfaces the user's last-cycle rank, Prime score and one of three outcome messages (qualified / missed top rank / not ranked), derived from the rank. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The last cycle summary user rewards card now always shows the rewards amount (zero when none), so drop the eligibility content override and its translations that are no longer used there. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c60f5ff to
bd2ecf9
Compare
| // Maximum rank that qualifies for Prime during a cycle | ||
| export const PRIME_RANK_LIMIT = 500; |
There was a problem hiding this comment.
This should be fetched from the contract (it could change in the future through a VIP).
| }, | ||
| "lastCycleSummary": { | ||
| "primeScoreLabel": "Prime score", | ||
| "rankLabel": "Your rank", |
There was a problem hiding this comment.
I mentioned this to Zed yesterday, this should be "You ranked". Sorry for the last minute change.
| "rankMissed": "Almost there! You weren't in last cycle's top 500. Boost your stake to qualify this cycle.", | ||
| "rankNoStake": "You didn't stake XVS last cycle. Stake now to qualify for Prime and earn extra rewards.", | ||
| "rankQualified": "Congrats! You're in the Top 500 during last cycle and qualified for Prime Rewards.", |
There was a problem hiding this comment.
These weren't proof read I think.
| "rankMissed": "Almost there! You weren't in last cycle's top 500. Boost your stake to qualify this cycle.", | |
| "rankNoStake": "You didn't stake XVS last cycle. Stake now to qualify for Prime and earn extra rewards.", | |
| "rankQualified": "Congrats! You're in the Top 500 during last cycle and qualified for Prime Rewards.", | |
| "rankMissed": "Almost there! You weren't in the top 500 last cycle. Increase your stake to qualify this cycle.", | |
| "rankNoStake": "You didn't stake XVS during the last cycle. Stake now to qualify for Prime in the next cycle and earn extra rewards.", | |
| "rankQualified": "Congrats! You were in the top 500 during the last cycle and qualified for Prime rewards.", |
Jira ticket(s)
no tickets only want separate PR for cycle summary modal
Changes